package Decorator.Dynamic;



public class Client {
    public static void main(String[] args) {
        IShowPic isp = new CRemotePic();
        CLocalPic cpic = new CLocalPic(isp);
        IShowPic localPic = (IShowPic)(cpic.getProxyInstance());

        localPic.showPic("AAA");

        ITestInterface ipic = new CTest();
        ITestInterface proxy = (ITestInterface) (new CLocalPic(ipic).getProxyInstance());
        proxy.sendMessage("BBB");
    }
}
